from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC


# 封装元素操作

class BasePage(object):
    def __init__(self, browser):
        self.driver = browser

    def geturl(self, url):
        self.driver.get(url)

    def quit(self):
        self.driver.quit()

    def sendkeys(self, selector, content):
        self.driver.find_element(*selector).send_keys(content)

    def click(self, selector):
        self.driver.find_element(*selector).click()
